#define _XOPEN_SOURCE 700
#include <stdio.h>
#include <signal.h>


void sigcb(int sign)
{
    printf("signum is %d\n",sign);
}

int main()
{
    struct sigaction sa;
    sigemptyset(&sa.sa_mask);
    sa.sa_handler = sigcb;
    sigaction(SIGINT,&sa,NULL);
    while(1)
    {}
    return 0;
}